<script>
export default {
  name: 'TeacherView',
  data () {
    return {
      msg: '你好世界'
    }
  },
  methods: {
    changeMsg () {
      this.msg = '我不好'
    }
  },
  created () {
    console.log(this.$route)
    console.log(this.$route.query.id)
  }
}
</script>

<template>
<div>
  <p>{{msg}}</p>
  <button type="button" @click="changeMsg">按钮</button>
</div>
</template>

<style scoped lang="scss">
p{
  color: red;
}
</style>
